<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css"/>
    <style type="text/css">
        html, body {
            /* background-image: url(../image/vip_bg.jpg);background-size:100% 100%;  */
            background: linear-gradient(to right, #fff 0, #fff 100%);
        }

        .vip_gou_1 {
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            align-items: center;
            width: 100%;
            position: relative;
            box-shadow: 0 1px 12px #ddd;
            margin: 10px 0px 10px 0px;
            padding: 15px 17px;
            bottom: 10px;
            top: 10px;
			border-radius: 8px;
        }

        .vip_gou_2 {
            margin-right: .5em;
            width: 60px;
            height: 60px;
            line-height: 60px;
            text-align: center;
        }

        .vip_gou_3 {
            width: 100%;
            max-height: 100%;
            vertical-align: top;
            font-weight: bold;
            background: linear-gradient(to right, #ff5e3e 0, #ff1679 100%);
            -webkit-background-clip: text;
            color: transparent;

        }

        .vip_gou_4 {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            flex: 1;
            min-width: 0;

        }

        .vip_gou_5 {
            font-weight: 400;
            font-size: 0.5rem;
            width: auto;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            word-wrap: normal;
            word-wrap: break-word;
            word-break: break-all;
            color: #c0c0c0;
            padding-bottom: 10px;

        }

        .vip_gou_6 {
            color: #808080;
            font-size: 0.5rem;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;

        }

        .vip_gou_7 {
            font-size: 0.8rem;
            font-style: normal;
            background: linear-gradient(to right, #ff5e3e 0, #ff1679 100%);
            -webkit-background-clip: text;
            color: transparent;
            font-weight: bold;

        }
		.vip_gou_8 {
    background-image: -webkit-gradient(linear, left top, right top, from(#ff5e3e), to(#ff1679));
    background-image: -webkit-linear-gradient(left, #ff5e3e, #ff1679);
    background-image: -moz-linear-gradient(left, #ff5e3e, #ff1679);
    background-image: linear-gradient(to right, #ff5e3e, #ff1679);
    background-color: #f7cc13;
    border-radius: 2px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.45rem;
    border-radius: 1000px;
	}

      /*  .vip_gou_8 {
            background-image: -webkit-gradient(linear, left top, right top, from(#ff5e3e), to(#ff1679));
            background-image: -webkit-linear-gradient(left, #ff5e3e, #ff1679);
            background-image: -moz-linear-gradient(left, #ff5e3e, #ff1679);
            background-image: linear-gradient(to right, #ff5e3e, #ff1679);
            background-color: #f7cc13;
            border-radius: 2px;
            color: #fff;
            font-size: 0.5rem;
            font-weight: bold;
            padding: 0.2rem 0.45rem;

        }*/
		
 .open-vip-t-1 {
    width: 92%;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: .3rem;
    box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
	background: linear-gradient(to right,#ff5e3e 0,#ff1679 100%);
	box-shadow: 0px 6px 11px 1px rgba(255, 83, 106, 0.2);
	
}
/*下面处理按钮事件*/
.aui-btn-tuichu-1 {
    width: 30% !important;/*原本100*/
    background-color: #ffffff;
    /* background: linear-gradient(to right,#ff5e3e 0,#ff1679 100%); */
    color: #039be5;
    text-align: center;
    border-radius: 0.3rem;
	margin: auto;/*自动对齐*/
}
    .vip_gou_1::before {


   content: "";
    position: absolute;
    top: calc(50% - 6px);
    left: -2px;
    width: 9px;
    height: 18px;
    background: rgba(241, 241, 241, 0.6);
    border-radius: 0 1000px 1000px 0;
    box-shadow: inset -5px 0px 8px -3px rgba(241, 241, 241, 0.6);
    box-sizing: border-box;
}
	.download-bg {
background: linear-gradient(-90deg, rgba(254, 45, 100, 1) 0%, rgba(255, 138, 80, 1) 99%);
        /*box-shadow: 0px 6px 11px 1px rgba(255, 83, 106, 0.2);*/
        padding: .14492rem .38647rem;
        border-radius: 1000px;
        
        text-align: center;
        color: #fff;
    }

    </style>

</head>
<body>
<style type="text/css">
</style>
<div class="br">

</div>
<div class="open-vip-t-1">
    <div class="br"></div>

    <div class="aui-content aui-margin-b-15">
        <center>
            <ul class="aui-list aui-form-list" style="width:90%;background-color: #f5f5f5f5;border-radius: 10px;">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-label-icon">
                            <i class="aui-iconfont aui-icon-lock"></i>
                        </div>
						<!--  -->

						<div class="aui-list-item-input">

						<!--  -->
                      <div class="aui-list-item-input">
                            <input id="kami" type="text" placeholder="在此处粘贴激活码-激活码充值" style=" color: #ff3a5c; ">
                        </div>
                    </div>
                </li>
            </ul>
        </center>
    </div>
    <div class="aui-content-padded">
        <p>

        <div class="aui-btn-tuichu-1 aui-btn-block" tapmode onclick="loginOff()">立 即 开 通</div>
		
        </p>
</div></div>
        <br/>
						<p style="text-align: center;margin-bottom: 16px;">
		<span id="times_container" >

      <span class="download-bg"> <span id="timer" class="timer"></span> </span>

</span>
</p>
		<!--  -->
<div class="aui-content-padded">
        <div class="open-vip-b">


            <div class="vip_gou_1" onclick="openUrl5()">
                <div class="vip_gou_2"><span class="vip_gou_3">体验卡</span></div>
                <div class="vip_gou_4"><h2 class="vip_gou_5">使用7天&nbsp;<s>（原价18元）</s></h2>
                     <p class="vip_gou_6">活动价仅需￥<em class="vip_gou_7" id="ty"></em><em class="vip_gou_7">元</em></p>
					
                </div>
                <div class="vip_gou_8">立即购买</div>
            </div>


            <div class="vip_gou_1" onclick="openUrl1()">
                <div class="vip_gou_2"><span class="vip_gou_3">月卡</span></div>
                <div class="vip_gou_4"><h2 class="vip_gou_5">使用30天&nbsp;<s>（原价28元）</s></h2>
                    <p class="vip_gou_6">活动价仅需￥<em class="vip_gou_7" id="yk"></em><em class="vip_gou_7">元</em></p>
					
                </div>
                <div class="vip_gou_8">立即购买</div>
            </div>

            <div class="vip_gou_1" onclick="openUrl2()">
                <div class="vip_gou_2"><span class="vip_gou_3">季卡</span></div>
                <div class="vip_gou_4"><h2 class="vip_gou_5">使用90天&nbsp;<s>（原价88元）</s></h2>
                    <p class="vip_gou_6">活动价仅需￥<em class="vip_gou_7" id="jk"></em><em class="vip_gou_7">元</em></p>
					
                </div>
                <div class="vip_gou_8">立即购买</div>
            </div>

            <div class="vip_gou_1" onclick="openUrl6()">
                <div class="vip_gou_2"><span class="vip_gou_3">半年卡</span></div>
                <div class="vip_gou_4"><h2 class="vip_gou_5">使用180天&nbsp;<s>（原价128元）</s></h2>
                    <p class="vip_gou_6">活动价仅需￥<em class="vip_gou_7" id="bn"></em><em class="vip_gou_7">元</em></p>
					
                </div>
                <div class="vip_gou_8">立即购买</div>
            </div>

            <div class="vip_gou_1" onclick="openUrl3()">
                <div class="vip_gou_2"><span class="vip_gou_3">年卡</span></div>
                <div class="vip_gou_4"><h2 class="vip_gou_5">使用365天&nbsp;<s>（原价188元）</s></h2>
                    <p class="vip_gou_6">活动价仅需￥<em class="vip_gou_7" id="nk"></em><em class="vip_gou_7">元</em></p>
					
                </div>
                <div class="vip_gou_8">立即购买</div>
            </div>

            <div class="vip_gou_1" onclick="openUrl4()">
                <div class="vip_gou_2"><span class="vip_gou_3">永久卡</span></div>
                <div class="vip_gou_4"><h2 class="vip_gou_5">终生观看&nbsp;<s>（原价598元）</s></h2>
                    <p class="vip_gou_6">活动价仅需￥<em class="vip_gou_7" id="yj"></em><em class="vip_gou_7">元</em></p>
					
                </div>
                <div class="vip_gou_8">立即购买</div>
            </div>


        </div>
        <br><br>
        <p>
        <div class="aui-btn-tuichu aui-btn-block" id="weichat">专属客服微信：---</div>
        </p>

    </div>
</div>


</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    var user_id = localStorage.getItem('user_id');
    var api_url = localStorage.getItem('api_url');
    apiready = function () {
        api.parseTapmode();
        newLoingdata();

        var clipBoard = api.require('clipBoard');
        clipBoard.get(function (ret, err) {
            if (ret) {

                if (ret.value.length == 8) {
                    var kami = $api.byId('kami');
                    kami.value = ret.value;
                    api.toast({
                        msg: '已为您自动粘贴刚才复制的激活码',
                        duration: 4000,
                        location: 'middle'
                    });
                }
            } else {

            }
        });


    }
    var ddtimer = setInterval(function () {
        newLoingdata();
    }, 5000)

    function newLoingdata() {
        api.ajax({
            url: api_url + '/login/login/veifys.html',
            method: 'get',
            data: {
                values: {
                    username: localStorage.getItem('user_name'),
                    passwd: localStorage.getItem('password'),
                    imei: api.deviceId,
                    mike_key:localStorage.getItem('mike_key')
                }
            }
        }, function (ret, err) {
            if (ret) {
                if (ret.code == 0) {
                    /* alert('出错了，请尝试重新登录');
                     return;
                     */

                    api.openWin({
                        name: 'login',
                        url: './login.html',
                        delay: 300
                    });
                    return;
                } else if (ret.code == 1) {
                    localStorage.setItem('user_id', ret.msg['id']);
                    localStorage.setItem('user_time', ret.msg['time']);
                    localStorage.setItem('user_share', ret.msg['share']);
                    localStorage.setItem('user_advert', ret.msg['advert']);
                    localStorage.setItem('user_code', ret.msg['code']);
                    localStorage.setItem('user_weichat', ret.msg['weichat']);
                    localStorage.setItem('user_ty', ret.msg['ty']);
                    localStorage.setItem('user_yk', ret.msg['yk']);
                    localStorage.setItem('user_jk', ret.msg['jk']);
                    localStorage.setItem('user_bn', ret.msg['bn']);
                    localStorage.setItem('user_nk', ret.msg['nk']);
                    localStorage.setItem('user_yj', ret.msg['yj']);
                    localStorage.setItem('url', ret.msg['url']);
                    localStorage.setItem('url1', ret.msg['url1']);
                    localStorage.setItem('url2', ret.msg['url2']);
                    localStorage.setItem('url3', ret.msg['url3']);
                    localStorage.setItem('url4', ret.msg['url4']);
                    localStorage.setItem('url5', ret.msg['url5']);
                    localStorage.setItem('url6', ret.msg['url6']);
                    localStorage.setItem('url7', ret.msg['url7']);
                    localStorage.setItem('search_url',ret.msg['search_url']);//搜索框网址
                    localStorage.setItem('erweima_url',ret.msg['erweima_url']);//生成二维码网址
                    localStorage.setItem('m112',ret.msg['m112']);//
                    localStorage.setItem('m113',ret.msg['m113']);//
                    localStorage.setItem('m114',ret.msg['m114']);//
                    localStorage.setItem('m115',ret.msg['m115']);//
                    var tydiv = $api.byId('ty');
                    tydiv.innerHTML = '' + localStorage.getItem('user_ty');
                    var ykdiv = $api.byId('yk');
                    ykdiv.innerHTML = '' + localStorage.getItem('user_yk');
                    var jkdiv = $api.byId('jk');
                    jkdiv.innerHTML = '' + localStorage.getItem('user_jk');
                    var bndiv = $api.byId('bn');
                    bndiv.innerHTML = '' + localStorage.getItem('user_bn');
                    var nkdiv = $api.byId('nk');
                    nkdiv.innerHTML = '' + localStorage.getItem('user_nk');
                    var yjdiv = $api.byId('yj');
                    yjdiv.innerHTML = '' + localStorage.getItem('user_yj');

                    var weichatdiv = $api.byId('weichat');
                    weichatdiv.innerHTML = '客服微信：' + localStorage.getItem('user_weichat');
                    api.sendEvent({
                        name: 'newLoingdata',
                        extra: {}

                    });

                }
            } else {
                alert('网络错误！');
                return;
            }
        });
    }


    function openUrl1() {

        if (localStorage.getItem('url1') == '无数据') {
            keFu();
            return;
        } else if (localStorage.getItem('url1') == '') {
            keFu();
            return;
        } else {
            toBanner(localStorage.getItem('url1'));
        }
    }

    function openUrl2() {
        if (localStorage.getItem('url2') == '无数据') {
            keFu();
            return;
        } else if (localStorage.getItem('url2') == '') {
            keFu();
            return;
        } else {
            toBanner(localStorage.getItem('url2'));
        }
    }

    function openUrl3() {
        if (localStorage.getItem('url3') == '无数据') {
            keFu();
            return;
        } else if (localStorage.getItem('url3') == '') {
            keFu();
            return;
        } else {
            toBanner(localStorage.getItem('url3'));
        }
    }

    function kaidl() {

        if (localStorage.getItem('user_id') > 1) {
            api.openWin({
                name: 'open_agent_win',
                url: './open_agent_win.html',
                delay: 300,
            });
        } else {     //否则跳转到登录
            api.openWin({
                name: 'login',
                url: './login.html',
                delay: 300,
            });
        }
    }

    function openUrl4() {
        if (localStorage.getItem('url4') == '无数据') {
            keFu();
            return;
        } else if (localStorage.getItem('url14') == '') {
            keFu();
            return;
        } else {
            toBanner(localStorage.getItem('url4'));
        }
    }

    function openUrl5() {
        if (localStorage.getItem('url5') == '无数据') {
            keFu();
            return;
        } else if (localStorage.getItem('url15') == '') {
            keFu();
            return;
        } else {
            toBanner(localStorage.getItem('url5'));
        }
    }

    function openUrl6() {
        if (localStorage.getItem('url6') == '无数据') {
            keFu();
            return;
        } else if (localStorage.getItem('url6') == '') {
            keFu();
            return;
        } else {
            toBanner(localStorage.getItem('url6'));
        }
    }


    //访问地址
    function toBanner(url) {
        var sys = api.systemType;
        if (sys == 'ios') {
            if (url == '') {
                keFu();
                return;
            } else {
                api.openApp({
                    iosUrl: url
                }, function (ret, err) {
                });
            }
        } else {

            if (url == '') {
                keFu();
                return;
            } else {
                api.openWin({
                    name: 'h5',
                    url: './h5.html',
                    pageParam: {
                        url: url
                    }
                });
            }

        }


    }

    function keFu() {
        var dialogBox = api.require('dialogBox');
        dialogBox.alert({
            texts: {
                content: localStorage.getItem('tishiyu') + localStorage.getItem('user_weichat'),
                leftBtnTitle: '知道了',
                rightBtnTitle: '复制微信/QQ'
            },
            styles: {
                bg: '#fff',
                w: 300,
                title: {                //（可选项）JSON对象；弹窗标题栏样式配置，不传则不显示标题区域
                    marginT: 20,       //（可选项）数字类型；标题栏与对话框顶端间距；默认：20
                    icon: 'widget://image/app/molisos.png',          //（可选项）字符串类型；标题前面的图标路径，要求本地路径（widget://、fs://）；图片为正方形的，如：50*50、100*100，建议开发者传大小合适的图片以适配高分辨率手机屏幕，不传则不显示
                    iconSize: 80,      //（可选项）数字类型；icon 图标边长大小,若 icon 不存在则此参数无效；默认：24
                    titleSize: 14,     //（可选项）数字类型；标题字体大小；默认：14
                    titleColor: '#000' //（可选项）字符串类型；标题字体颜色，支持#、rgb、rgba；默认：#fff
                },
                content: {
                    color: '#000',
                    size: 16
                },
                left: {                 //（可选项）JSON 对象；左边按钮样式配置，不传则不显示左边按钮
                    marginB: 30,        //（可选项）数字类型；左边按钮的下边距；默认：7
                    marginL: 30,       //（可选项）数字类型；左边按钮的左边距；默认：20
                    w: 100,            //（可选项）数字类型；左边按钮的宽；默认：130
                    h: 40,             //（可选项）数字类型；左边按钮的高；默认：35
                    corner: 10,         //（可选项）数字类型；左边按钮圆角半径；默认：0.0
                    bg: '#3d3d3d',        //（可选项）字符串类型；左边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
                    color: '#fff',  //（可选项）字符串类型；左边按钮标题字体颜色，支持rgb，rgba、#；默认：'#007FFF'
                    size: 12           //（可选项）数字类型；左边按钮标题字体大小；默认：12
                },
                right: {               //（可选项）JSON 对象；右边按钮样式配置，不传则不显示右边按钮
                    marginB: 30,        //（可选项）数字类型；右边按钮的下边距；默认：7
                    marginL: 40,      //（可选项）数字类型；右边按钮左边距；默认：10
                    w: 100,            //（可选项）数字类型；右边按钮的宽；默认：130
                    h: 40,             //（可选项）数字类型；右边按钮的高；默认：35
                    corner: 10,         //（可选项）数字类型；右边按钮圆角半径；默认：0.0
                    bg: '#ff0103',        //（可选项）字符串类型；右边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
                    color: '#fff',  //（可选项）字符串类型；右边按钮标题字体颜色，支持rgb、rgba、#；默认：'#007FFF'
                    size: 12           //（可选项）数字类型；右边按钮标题字体大小；默认：12
                }
            }
        }, function (ret) {
            if (ret.eventType == 'left') {
                var dialogBox = api.require('dialogBox');
                dialogBox.close({
                    dialogName: 'alert'
                });
            } else if (ret.eventType == 'right') {
                var clipBoard = api.require('clipBoard');
                clipBoard.set({
                    value: localStorage.getItem('user_weichat')
                }, function (ret, err) {
                    if (ret) {
                        api.toast({
                            msg: '已复制号码到剪切板',
                            duration: 2000
                        });
                        var dialogBox = api.require('dialogBox');
                        dialogBox.close({
                            dialogName: 'alert'
                        });
                    } else {

                    }
                });
            }
        });
    }


    //充值点卡
    function loginOff() {
        var kami = $api.val($api.byId('kami'));
        if (kami == '') {
            /*    api.alert({
                    title: '调皮~',
                    msg: '请输入卡密',
                });*/
            api.toast({
                msg: 'ε=(´ο｀*))) 调皮~   激活码还没输入',
                duration: 5000
            });
            return;
        }
        if (user_id < 1) {
            alert('请先登录');
            api.openWin({
                name: 'login',
                url: './login.html',
            });
            return;
        } else {
            api.showProgress({
                title: '验证中...',
                text: '请骚等...',
                modal: false
            });
            api.ajax({
                url: api_url + '/login/login/dianka.html',
                method: 'get',
                data: {
                    values: {
                        uid: localStorage.getItem('user_id'),
                        dianka: kami,
                        mike_key:localStorage.getItem('mike_key')
                    }
                }
            }, function (ret, err) {
                if (ret) {
                    if (ret.code == 0) {
                        api.hideProgress();
                        api.alert({
                            title: '哎呀~',
                            msg: ret.msg,
                        });
                        return;
                    } else if (ret.code == 1) {
                        api.hideProgress();
                        api.alert({
                            title: '恭喜!',
                            msg: '充值成功',
                        });
                        localStorage.setItem('user_time', ret.lasttime);
                        api.sendEvent({
                            name: 'newLoingdata',
                            extra: {}
                        });
                        api.closeWin();

                    }

                } else {
                    api.hideProgress();
                    api.alert({
                        title: '糟糕~',
                        msg: '网络似乎有点问题',
                    });
                }
            });

        }
    }


</script>
<script src="../js/jquery.min.js"></script>
<script type="text/javascript"  language="javascript">
function timerBox(idstr,timestr,day){
    var timeBox=$(idstr),
    t=day,
    starTime=new Date(timestr),
    timer;
    function count(){
    endTime=new Date(),
    newTime=parseInt((endTime.getTime()-starTime.getTime())/1000),
    n=parseInt(newTime/3600/24/t),
    leftSecond=t*24*3600-(newTime-t*n*24*3600),
    day=parseInt(leftSecond/3600/24),
    hour=parseInt((leftSecond/3600)%24),
    minite=parseInt((leftSecond/60)%60),
    second=parseInt(leftSecond%60);
    if(leftSecond>0){
        timeBox.html("离活动结束仅剩:<b>" + hour + "</b>时<b>" + minite + "</b>分<b>" + second + "</b>秒");
        timer=setTimeout(count,1000);
    }else{
        timeBox.html("抢购已经结束！");
        clearTimeout(timer);
    };
 
    };
 
    count();
     
};
timerBox("#timer",'2020/08/25 02:38:59',20);
timerBox("#timer2","2015/05/18 10:00:00",5);
</script>
</html>
